package net.zjitc.controller;

import net.zjitc.utils.dispatch.URLMapping;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * Created by Administrator on 2017/11/8.
 */
public class ProductController {
    @URLMapping(url = "/addServlet")
    public String add(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        request.setAttribute("msg","请求转发");
        return "/msg.jsp";
    }
    @URLMapping(url = "/deleteServlet")
    public String delete(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        return "Redirect:"+request.getContextPath()+"/list.jsp";
    }
}
